home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / src / Property / examples / ex_Property.C next >
C/C++ Source or Header  |  1992-06-12  |  763b  |  29 lines

  1. //
  2. // Copyright (C) 1992 General Electric Company.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // General Electric Company provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12.  
  13. #include <cool/Property.h>
  14.  
  15. void main() {
  16.   CoolProperty plist;
  17.   plist.put("p0", int(1));
  18.   plist.put("p1", double(2.5));
  19.   plist.put("p2", &plist);
  20.   cout << plist << endl;
  21.  
  22.   CoolValue v0, v1, v2;
  23.   cout << plist.get("p0", v0) << "\t";
  24.   cout << plist.get("p1", v1) << "\t";
  25.   cout << plist.get("p", v2) << "\t";
  26.   cout << plist.remove("p2") << "\t";
  27. }
  28.  
  29.